<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:core="http://www.contact.core.com/contacts/core/ui"
      xmlns:srch="http://www.contact.search.com/contacts/search/ui"
      xmlns:atria="http://www.atria.cz/common/jsf"
        >

<ui:component>
    <style type="text/css">
        table.noborder td {
            border: 0px;
        }
    </style>
    <h:form>

        <rich:panel id="searchResultPanel"
                    style="overflow:auto;  width:100%; border:none"

                    bodyClass="rich-laguna-panel-no-header">


            <rich:dataTable id="allSearchResultTable"
                            var="item"
                            value="#{searchBean.searchResult}"
                            rows="2"
                            style="width:100%; border:none"
                            styleClass="noborder">
                <rich:column>
                    <a4j:outputPanel rendered="#{accountBean.userLogedIn}">
                           <srch:oneRowResult searchResult="#{item}"/>
                    </a4j:outputPanel>
                     <a4j:outputPanel rendered="#{not accountBean.userLogedIn}">
                           <srch:oneRowResultNotLogin searchResult="#{item}"/>
                    </a4j:outputPanel>
                    <rich:separator height="1px" width="100%" style="margin-top:3px; margin-bottom:3px"/> 
                    <a4j:outputPanel layout="block" style="height:10px"/>
                </rich:column>
            </rich:dataTable>
            <rich:datascroller align="center"
                               for="allSearchResultTable"
                               style="width:100%"
                               maxPages="100"
                               limitToList="true"
                               ajaxSingle="false"
                               renderIfSinglePage="false"
                               page="#{searchBean.scrollerPage}"
                               reRender="searchResultPanel"/>

            <!--<a4j:repeat id="viewSearchResult" value="#{searchBean.searchResult}"-->
            <!--var="item">-->
            <!--<srch:oneRowResult searchResult="#{item}"/>-->
            <!--<a4j:outputPanel layout="block" style="height:10px"/>-->
            <!--</a4j:repeat>-->
        </rich:panel>


    </h:form>
        
</ui:component>


</html>